package edu.zut.hb.ambition.report.domain.;

import edu.zut.hb.ambition.base.dao.GenericDao;
import edu.zut.hb.ambition.base.domain.BaseTreeEntity;
import edu.zut.hb.ambition.report.domain.Report;
import org.apache.ibatis.mapping.FetchType;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.OneToMany;
import java.util.Set;

public class ReportGroup extends BaseTreeEntity<ReportGroup, Long> {


    private static final long serialVersionUID = 5793044840120005316L;


    @Column(name = "CODE")
    String code;


    @Column(name = "PRICE")
    Integer price;

    @OneToMany(mappedBy = "cartGroup", cascade = CascadeType.REMOVE, fetch = FetchType.EAGER)
    Set<Report> reports;


    public Set<Report> getReports() {
        return reports;
    }

    public void setOutpatienttypes(Set<Report> carts) {
        this.reports = reports;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Integer getPrice() {
        return price;
    }


    public void setPrice(Integer price) {
        this.price = price;
    }
}